package com.yixin.hospital.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum DrugDepositoryOtpTypeEnum {

    QUERY(1, "查询"),
    SELL(2, "销售"),
    INPUT(3, "入库"),
    OUTPUT(4, "出库"),
    CHECK(5, "盘点"),
    WRITE_OFF(6, "核销"),
    PURCHASE(7, "采购"),
    COST_PRICE(8, "成本价"),
    ;

    private int code;
    private String desc;

    public static String getDesc(int code) {
        for (DrugDepositoryOtpTypeEnum drugDepositoryOtpTypeEnum : DrugDepositoryOtpTypeEnum.values()) {
            if (drugDepositoryOtpTypeEnum.getCode() == code) {
                return drugDepositoryOtpTypeEnum.getDesc();
            }
        }
        return "";
    }
}
